package com.quick.calcu.mapper;

import com.quick.calcu.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    // 基础CRUD方法已由BaseMapper提供
    // 可添加自定义SQL方法
    // 新增：统计同名用户数量
    @Select("SELECT COUNT(*) FROM user WHERE username = #{username}")
    int countByUsername(String username);
}